package com.pocket.insight.base.utils;

import com.pocket.insight.base.sql.vendor.MysqlVendor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

/**
 * 描述：
 *
 * @author shuize
 * @create 2024/11/29
 */
public class URLUtil {

    private static final Logger logger = LoggerFactory.getLogger(URLUtil.class);

    public static String encode(String value){
        if (value != null) {
            try {
                return URLEncoder.encode(value, StandardCharsets.UTF_8.name());
            } catch (Exception e) {
                logger.warn(e.getMessage(), e);
            }
        }
        return value;
    }
}
